<!--$embed{"header.htm"}-->

<div class="mainarea">
<div class="maininner">

	<form method="post" action="admincp.html?ac=cron&cronid=${cronid}">
	<input type="hidden" name="formhash" value="<!--${&com.heaven.web.utils.Common.formhash()}-->" />
	<div class="bdrcontent">

	<div class="topactions">
		<a href="admincp.html?ac=cron">浏览</a> | <a href="admincp.html?ac=cron&op=add">添加</a>
	</div>
		
<!--$if{ op=='edit' || op=='add'}-->
	
	<table cellspacing="0" cellpadding="0" class="formtable">
	<tr>
		<th style="width:12em;">任务名</th>
		<td><input size="25" name="name" value="${thevalue['name']}" type="text">
		</td></tr>
	<tr>
		<th>任务执行方法</th>
		<td><input size="25" name="filename" value="${thevalue['filename']}" type="text">
			<br>这里为com.heaven.service.CronFacade的方法
		</td></tr>
	<tr>
		<th>有效性</th>
		<td><input type="radio" name="available" value="1"<!--$if{thevalue['available']}--> checked<!--$end-->>有效 <input type="radio" name="available" value="0"<!--$if{!thevalue['available']}--> checked<!--$end-->>无效
		</td></tr>
	<tr>
		<th>星期</th>
		<td><select name="weekday">
			<option value="-1">*</option>
			<option value="0"${weekdays['0']}>星期日</option>
			<option value="1"${weekdays['1']}>星期一</option>
			<option value="2"${weekdays['2']}>星期二</option>
			<option value="3"${weekdays['3']}>星期三</option>
			<option value="4"${weekdays['4']}>星期四</option>
			<option value="5"${weekdays['5']}>星期五</option>
			<option value="6"${weekdays['6']}>星期六</option>
			</select>
			<br>本设置会覆盖下面的“日”设定</td></tr>
	<tr>
		<th>日</th>
		<td>
		<select name="day">
		<option value="-1">*</option>
		${daystr}
		</select></td></tr>
	<tr>
		<th>小时</th>
		<td>
		<select name="hour">
		<option value="-1">*</option>
		${hourstr}
		</select></td></tr>
	<tr>
		<th>分钟</th>
		<td>
		${minuteselect}</td></tr>
	</table>
	
	</div>
	<div class="footactions">
	<input type="submit" name="cronsubmit" value="提交" class="submit">
	
	
<!--$else-->
	<table cellspacing="0" cellpadding="0" class="formtable">
	<tr>
		<th>任务名</th>
		<th>上次执行/下次执行</th>
		<th>操作</th>
	</tr>
	<!--$for{value:list}-->
	<tr>
		<td><b>${value['name']}</b><br />${value['filename']}</td>
		<td>${value['lastrun']}<br>${value['nextrun']}</td>
		<td><a href="admincp.html?ac=cron&op=edit&cronid=${value['cronid']}">编辑</a>
		<!--$if{ value['available']}-->&nbsp;|&nbsp;<a href="admincp.html?ac=cron&op=run&cronid=${value['cronid']}">执行</a><!--$end-->
		<!--$if{ value['type']!='system'}-->&nbsp;|&nbsp;<a href="admincp.html?ac=cron&op=delete&cronid=${value['cronid']}">删除</a><!--$end-->
		</td>
	</tr>
	<!--$end-->
	</table>
	
<!--$end-->

	</div>
	</form>

</div>
</div>

<div class="side">
	<!--$embed{"side.htm"}-->
</div>

<!--$embed{"footer.htm"}-->